.class public Ldgb/w1;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ldgb/x1;


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Ldgb/q1$m;)I
    .locals 10

    const/4 v0, 0x0

    if-eqz p1, :cond_d

    .line 1
    invoke-virtual {p0}, Ldgb/w1;->a()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p1, Ldgb/q1$m;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    goto/16 :goto_3

    .line 2
    :cond_0
    iget-object v1, p1, Ldgb/q1$m;->a:Ljava/lang/String;

    invoke-static {v1}, Ldgb/c1;->a(Ljava/lang/String;)Ldgb/m1;

    move-result-object v1

    if-nez v1, :cond_1

    return v0

    .line 3
    :cond_1
    invoke-virtual {p0}, Ldgb/w1;->a()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p1, Ldgb/q1$m;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_2

    return v0

    .line 4
    :cond_2
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    iget-object v2, p1, Ldgb/q1$m;->d:Ljava/lang/String;

    invoke-direct {v1, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v2, "work"

    .line 5
    invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 6
    invoke-virtual {p0}, Ldgb/w1;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_3

    return v0

    :cond_3
    const-string v2, "url"

    .line 7
    invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 8
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_4

    return v0

    :cond_4
    const-string v3, "network"

    .line 9
    invoke-virtual {v1, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 10
    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    const-string v5, "preload_file"

    const-string v6, "preload_bkg"

    if-eqz v4, :cond_6

    :try_start_1
    iget-object v4, p1, Ldgb/q1$m;->e:Ljava/lang/String;

    .line 11
    invoke-virtual {v6, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_5

    iget-object v4, p1, Ldgb/q1$m;->e:Ljava/lang/String;

    .line 12
    invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_6

    :cond_5
    return v0

    :cond_6
    const-string v4, "size"

    const/4 v7, -0x1

    .line 13
    invoke-virtual {v1, v4, v7}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I

    move-result v1

    if-gez v1, :cond_7

    return v0

    .line 14
    :cond_7
    iget-object v4, p1, Ldgb/q1$m;->e:Ljava/lang/String;

    invoke-virtual {v6, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_9

    iget-object v4, p1, Ldgb/q1$m;->e:Ljava/lang/String;

    .line 15
    invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_8

    goto :goto_0

    .line 16
    :cond_8
    invoke-static {}, Ldgb/p1;->d()Ldgb/p1;

    move-result-object v4

    goto :goto_1

    .line 17
    :cond_9
    :goto_0
    invoke-static {}, Ldgb/p1;->c()Ldgb/p1;

    move-result-object v4

    :goto_1
    if-nez v4, :cond_a

    return v0

    .line 18
    :cond_a
    new-instance v7, Ldgb/t1$b;

    invoke-direct {v7}, Ldgb/t1$b;-><init>()V

    .line 19
    iget-object v8, p1, Ldgb/q1$m;->a:Ljava/lang/String;

    iput-object v8, v7, Ldgb/t1$b;->a:Ljava/lang/String;

    .line 20
    iput-object v3, v7, Ldgb/t1$b;->c:Ljava/lang/String;

    .line 21
    iput-object v2, v7, Ldgb/t1$b;->b:Ljava/lang/String;

    int-to-long v8, v1

    .line 22
    iput-wide v8, v7, Ldgb/t1$b;->e:J

    .line 23
    iget-object v1, p1, Ldgb/q1$m;->e:Ljava/lang/String;

    invoke-virtual {v6, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_b

    .line 24
    iput-object v6, v7, Ldgb/t1$b;->d:Ljava/lang/String;

    goto :goto_2

    .line 25
    :cond_b
    iget-object v1, p1, Ldgb/q1$m;->e:Ljava/lang/String;

    invoke-virtual {v5, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_c

    .line 26
    iput-object v5, v7, Ldgb/t1$b;->d:Ljava/lang/String;

    goto :goto_2

    :cond_c
    const-string v1, "download"

    .line 27
    iput-object v1, v7, Ldgb/t1$b;->d:Ljava/lang/String;

    .line 28
    :goto_2
    iget-object p1, p1, Ldgb/q1$m;->a:Ljava/lang/String;

    invoke-static {p1, v2}, Ldgb/u1;->c(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v4, p1, v7}, Ldgb/p1;->a(Ljava/lang/String;Ldgb/t1$b;)Z

    .line 29
    invoke-virtual {v4}, Ldgb/p1;->a()Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    const/4 p1, 0x2

    return p1

    :catch_0
    :cond_d
    :goto_3
    return v0
.end method

.method public a()Ljava/lang/String;
    .locals 1

    const-string v0, "download"

    return-object v0
.end method
